#include "const.h"

var_t v_var(const char *name) {
	const char *p;
	uint32_t hash;
	var_t root, v;

	root = v_findroot(name);
	if (!(p = strrchr(name, '.')))
		p = name;

	hash = v_hash(name);
	if (!(v = v_findhash(root, hash)))
		v = v_newhash(root, name, hash);

	return v;
}
